home *** CD-ROM | disk | FTP | other *** search
/ Champak 40 / Vol 40.iso / games / balloon_.swf / scripts / frame_19 / DoAction_2.as next >
Encoding:
Text File  |  2007-05-10  |  15.9 KB  |  417 lines

  1. function ┬º\x01\x02┬º()
  2. {
  3.    return 1687;
  4. }
  5. var ┬º\x01┬º = -1190 + "\x01\x02"();
  6. while(true)
  7. {
  8.    if(eval("\x01") == 497)
  9.    {
  10.       set("\x01",eval("\x01") + 479);
  11.       ┬º┬ºpush(true);
  12.    }
  13.    else if(eval("\x01") == 954)
  14.    {
  15.       set("\x01",eval("\x01") - 17);
  16.    }
  17.    else if(eval("\x01") == 330)
  18.    {
  19.       set("\x01",eval("\x01") + 315);
  20.       if(function ┬º\x01\x02┬º()
  21.       {
  22.          return 1687;
  23.       })
  24.       {
  25.          set("\x01",eval("\x01") + 110);
  26.       }
  27.    }
  28.    else if(eval("\x01") == 75)
  29.    {
  30.       set("\x01",eval("\x01") + 862);
  31.    }
  32.    else if(eval("\x01") == 729)
  33.    {
  34.       set("\x01",eval("\x01") - 399);
  35.       ┬º┬ºpush(!function ┬º\x01\x02┬º()
  36.       {
  37.          return 1687;
  38.       });
  39.    }
  40.    else if(eval("\x01") == 536)
  41.    {
  42.       set("\x01",eval("\x01") + 193);
  43.       ┬º┬ºpush(eval(function ┬º\x01\x02┬º()
  44.       {
  45.          return 1687;
  46.       }));
  47.    }
  48.    else if(eval("\x01") == 515)
  49.    {
  50.       set("\x01",eval("\x01") + 21);
  51.       ┬º┬ºpush("\x0f");
  52.    }
  53.    else if(eval("\x01") == 976)
  54.    {
  55.       set("\x01",eval("\x01") - 325);
  56.       if(function ┬º\x01\x02┬º()
  57.       {
  58.          return 1687;
  59.       })
  60.       {
  61.          set("\x01",eval("\x01") - 576);
  62.       }
  63.    }
  64.    else if(eval("\x01") == 147)
  65.    {
  66.       set("\x01",eval("\x01") + 368);
  67.       var ┬º┬ºpop() = function ┬º\x01\x02┬º()
  68.       {
  69.          return 1687;
  70.       };
  71.    }
  72.    else
  73.    {
  74.       if(eval("\x01") == 651)
  75.       {
  76.          set("\x01",eval("\x01") - 576);
  77.          toggleHighQuality();
  78.          break;
  79.       }
  80.       if(eval("\x01") == 645)
  81.       {
  82.          set("\x01",eval("\x01") + 110);
  83.       }
  84.       else
  85.       {
  86.          if(eval("\x01") != 937)
  87.          {
  88.             if(eval("\x01") == 755)
  89.             {
  90.                set("\x01",eval("\x01") - 663);
  91.                Movieclip.prototype.clrscr = function()
  92.                {
  93.                   removeMovieClip(_root.pop);
  94.                   var _loc2_ = 0;
  95.                   while(_loc2_ < _root.allb.length)
  96.                   {
  97.                      removeMovieClip(_root[_root.allb[_loc2_]]);
  98.                      _loc2_ = _loc2_ + 1;
  99.                   }
  100.                };
  101.                Movieclip.prototype.popscore = function(mc, score)
  102.                {
  103.                   _root.attachmovie("pop","pop",_root.popdepth);
  104.                   _root.pop._x = _root[mc]._x;
  105.                   _root.pop._y = _root[mc]._y;
  106.                   _root.pop.a.ad = score;
  107.                   _root.pop.follow = mc;
  108.                };
  109.                Movieclip.prototype.create = function()
  110.                {
  111.                   _root.attachmovie("dot","b" + _root.b,_root.b);
  112.                   _root.allb.push("b" + _root.b);
  113.                   var _loc2_ = _root["b" + _root.b];
  114.                   if(random(100) > 50)
  115.                   {
  116.                      _loc2_._x = 0;
  117.                      _loc2_._y = random(ymax);
  118.                   }
  119.                   else
  120.                   {
  121.                      _loc2_._x = random(xmax);
  122.                      _loc2_._y = 0;
  123.                   }
  124.                   _loc2_.cl = _root.carray.pop();
  125.                   set("_root.b",_root.b + 1);
  126.                };
  127.                Movieclip.prototype.line2line = function(px1, py1, px2, py2, qx1, qy1, qx2, qy2)
  128.                {
  129.                   if(py2 == py1)
  130.                   {
  131.                      py2 = py1 + 0.000001;
  132.                   }
  133.                   else if(px2 == px1)
  134.                   {
  135.                      px2 = px1 + 0.000001;
  136.                   }
  137.                   var _loc8_ = px2 - px1;
  138.                   var _loc7_ = py2 - py1;
  139.                   var _loc6_ = _loc7_ / _loc8_;
  140.                   var _loc18_ = py1 - _loc6_ * px1;
  141.                   if(qy2 == qy1)
  142.                   {
  143.                      qy2 = qy1 + 0.000001;
  144.                   }
  145.                   else if(qx2 == qx1)
  146.                   {
  147.                      qx2 = qx1 + 0.000001;
  148.                   }
  149.                   _loc8_ = qx2 - qx1;
  150.                   _loc7_ = qy2 - qy1;
  151.                   var _loc2_ = _loc7_ / _loc8_;
  152.                   var _loc15_ = qy1 - _loc2_ * qx1;
  153.                   if(_loc6_ != _loc2_)
  154.                   {
  155.                      var _loc5_ = (_loc15_ - _loc18_) / (_loc6_ - _loc2_);
  156.                      var _loc19_ = _loc2_ * _loc5_ + _loc15_;
  157.                      var _loc9_ = (_loc5_ - qx1) / (qx2 - qx1);
  158.                      var _loc10_ = (_loc5_ - px1) / (px2 - px1);
  159.                      if(_loc9_ >= 0 and _loc9_ <= 1 and (_loc10_ >= 0 and _loc10_ <= 1))
  160.                      {
  161.                         this.xpc = _loc5_;
  162.                         this.ypc = _loc19_;
  163.                         return true;
  164.                      }
  165.                      return false;
  166.                   }
  167.                   return false;
  168.                };
  169.                Movieclip.prototype.removing = function(target, arr)
  170.                {
  171.                   var found = 0;
  172.                   var i = 0;
  173.                   var n = 0;
  174.                   while(!found)
  175.                   {
  176.                      if(eval(arr)[i] eq target)
  177.                      {
  178.                         n = i;
  179.                         found = 1;
  180.                      }
  181.                      i += 1;
  182.                   }
  183.                   eval(arr).splice(n,1);
  184.                };
  185.                Array.prototype.randomize = function()
  186.                {
  187.                   return this.sort(function(a, b)
  188.                   {
  189.                      return Math.floor(Math.random() * 2) != 0 ? -1 : 1;
  190.                   }
  191.                   );
  192.                };
  193.                Array.prototype.scramble = function()
  194.                {
  195.                   var _loc2_ = 0;
  196.                   while(_loc2_ < this.length)
  197.                   {
  198.                      var _loc3_ = random(this.length);
  199.                      var _loc4_ = this[_loc3_];
  200.                      this[_loc3_] = this[_loc2_];
  201.                      this[_loc2_] = _loc4_;
  202.                      _loc2_ = _loc2_ + 1;
  203.                   }
  204.                };
  205.                Movieclip.prototype.rad = function(qdeg)
  206.                {
  207.                   return qdeg * 0.017453292519943295;
  208.                };
  209.                Movieclip.prototype.deg = function(qrad)
  210.                {
  211.                   return qrad * 57.2957795130823;
  212.                };
  213.                createLi();
  214.                onMouseDown = function()
  215.                {
  216.                   if(_root.canpress)
  217.                   {
  218.                      _root.pressing = true;
  219.                      if(!li)
  220.                      {
  221.                         createLi();
  222.                      }
  223.                      trace(li);
  224.                      trace(1);
  225.                      with(li)
  226.                      {
  227.                         clear();
  228.                         for(var mc in li)
  229.                         {
  230.                            li[mc].removeMovieClip();
  231.                         }
  232.                         lineStyle(1,14352247,100);
  233.                      }
  234.                      set("_root.click",1);
  235.                      set("_root.drawtimenow",0);
  236.                      _root.linestatus.gotoAndStop(11);
  237.                      set("_root.pnum",1);
  238.                      set("_root.px",new Array());
  239.                      set("_root.py",new Array());
  240.                      _root.px[0] = _root._xmouse;
  241.                      _root.py[0] = _root._ymouse;
  242.                   }
  243.                };
  244.                onEnterFrame = function()
  245.                {
  246.                   if(_root.click)
  247.                   {
  248.                      set("_root.drawtimenow",_root.drawtimenow + 1);
  249.                      if(_root.drawtimenow > _root.drawtimemax)
  250.                      {
  251.                         set("_root.click",0);
  252.                         set("_root.drawtimenow",0);
  253.                         if(!li)
  254.                         {
  255.                            createLi();
  256.                         }
  257.                         with(li)
  258.                         {
  259.                            clear();
  260.                         }
  261.                      }
  262.                      else if(_root._xmouse != _root.px[_root.pnum - 1] and _root._ymouse != _root.py[_root.pnum - 1])
  263.                      {
  264.                         if(!li)
  265.                         {
  266.                            createLi();
  267.                         }
  268.                         with(li)
  269.                         {
  270.                            moveTo(_root.px[_root.pnum - 1],_root.py[_root.pnum - 1]);
  271.                            lineTo(_root._xmouse,_root._ymouse);
  272.                         }
  273.                         if(_root.pnum > 5)
  274.                         {
  275.                            var i = 1;
  276.                            while(i < _root.px.length - 3)
  277.                            {
  278.                               var cek = 0;
  279.                               cek = line2line(_root.px[_root.pnum - 1],_root.py[_root.pnum - 1],_root._xmouse,_root._ymouse,_root.px[i],_root.py[i],_root.px[i - 1],_root.py[i - 1]);
  280.                               if(cek)
  281.                               {
  282.                                  set("_root.click",0);
  283.                                  set("_root.drawtimenow",0);
  284.                                  if(!li)
  285.                                  {
  286.                                     createLi();
  287.                                  }
  288.                                  with(li)
  289.                                  {
  290.                                     clear();
  291.                                  }
  292.                                  createEmptyMovieClip("r" + r,r);
  293.                                  var t = this["r" + r];
  294.                                  with(t)
  295.                                  {
  296.                                     lineStyle(1,14352247,100);
  297.                                     moveTo(xpc,ypc);
  298.                                     beginFill(13562992,60);
  299.                                     t.onEnterFrame = function()
  300.                                     {
  301.                                        if(cek != 9)
  302.                                        {
  303.                                           cek = 9;
  304.                                           var _loc3_ = new Array();
  305.                                           var _loc8_ = new Array();
  306.                                           var biggest = 0;
  307.                                           var _loc5_ = 0;
  308.                                           var _loc4_ = "";
  309.                                           var _loc9_ = [];
  310.                                           for(mc in _root.bugs)
  311.                                           {
  312.                                              if(this.hitTest(_root.bugs[mc]._x,_root.bugs[mc]._y,true))
  313.                                              {
  314.                                                 if(_loc4_ == "")
  315.                                                 {
  316.                                                    _loc4_ = _root.bugs[mc].style;
  317.                                                 }
  318.                                                 else if(_loc4_ != _root.bugs[mc].style)
  319.                                                 {
  320.                                                    _loc5_ = 0;
  321.                                                    _loc3_ = [];
  322.                                                    break;
  323.                                                 }
  324.                                                 if(biggest._xscale < _root.bugs[mc]._xscale || biggest == 0)
  325.                                                 {
  326.                                                    biggest = _root.bugs[mc];
  327.                                                 }
  328.                                                 _loc3_[_loc5_] = _root.bugs[mc];
  329.                                                 _loc5_ = _loc5_ + 1;
  330.                                              }
  331.                                           }
  332.                                           if(_loc3_.length > 1)
  333.                                           {
  334.                                              i = 0;
  335.                                              while(i < _loc3_.length)
  336.                                              {
  337.                                                 trace("biggest " + biggest);
  338.                                                 biggest.hold();
  339.                                                 if(_loc3_[i] != biggest)
  340.                                                 {
  341.                                                    _loc3_[i].onEnterFrame = function()
  342.                                                    {
  343.                                                       var _loc4_ = (this._x - biggest._x) / 5;
  344.                                                       var _loc3_ = (this._y - biggest._y) / 5;
  345.                                                       this._x -= _loc4_;
  346.                                                       this._y -= _loc3_;
  347.                                                       if(this.hitTest(biggest._x,biggest._y,true))
  348.                                                       {
  349.                                                          biggest.num += this._xscale / 5;
  350.                                                          biggest.grow(this._xscale);
  351.                                                          _root.showScore(this,i - 1);
  352.                                                          this.removeMovieClip();
  353.                                                       }
  354.                                                    };
  355.                                                 }
  356.                                                 i++;
  357.                                              }
  358.                                           }
  359.                                        }
  360.                                        else
  361.                                        {
  362.                                           biggest.unhold();
  363.                                        }
  364.                                        _alpha -= 5;
  365.                                        if(_alpha <= 0)
  366.                                        {
  367.                                           removeMovieClip(this);
  368.                                        }
  369.                                     };
  370.                                  }
  371.                                  var f = i;
  372.                                  while(f < _root.px.length)
  373.                                  {
  374.                                     with(t)
  375.                                     {
  376.                                        lineTo(_root.px[f],_root.py[f]);
  377.                                     }
  378.                                     f++;
  379.                                  }
  380.                                  with(t)
  381.                                  {
  382.                                     endFill();
  383.                                  }
  384.                                  r += 1;
  385.                                  if(r > 100)
  386.                                  {
  387.                                     r = 10;
  388.                                  }
  389.                                  _root.polClosed = _root.polClosed + 1;
  390.                                  _root.pressing = false;
  391.                                  trace("Polygons closed: " + _root.polClosed);
  392.                                  break;
  393.                               }
  394.                               i++;
  395.                            }
  396.                         }
  397.                         _root.px[_root.pnum] = _root._xmouse;
  398.                         _root.py[_root.pnum] = _root._ymouse;
  399.                         set("_root.pnum",_root.pnum + 1);
  400.                      }
  401.                   }
  402.                };
  403.                break;
  404.             }
  405.             if(eval("\x01") == 92)
  406.             {
  407.                set("\x01",eval("\x01") - 92);
  408.             }
  409.             break;
  410.          }
  411.          set("\x01",eval("\x01") - 790);
  412.          ┬º┬ºpush("\x0f");
  413.          ┬º┬ºpush(1);
  414.       }
  415.    }
  416. }
  417.